package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.manger.dto.FriendDto;
import com.zhentao.service.FriendService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 王越潇
 * @version 1.0
 * @Date 2024/10/6 23:10
 * @Type
 */
@RestController
@RequestMapping("ma/friend")
@Api(tags = "交友圈管理")
public class FriendController {
    @Resource
    private FriendService friendService;
    @PostMapping("list")
    @ApiOperation("交友圈列表")
    public ResponseResult list(@RequestBody FriendDto dto){
        return friendService.findAll(dto);
    }
    @GetMapping("auditSuccess/{id}")
    @ApiOperation("交友圈审核成功方法")
    public ResponseResult auditSuccess(@PathVariable("id")Integer id){
        return friendService.auditSuccess(id);
    }
    @GetMapping("auditFail/{id}")
    @ApiOperation("交友圈审核失败方法")
    public ResponseResult auditFail(@PathVariable("id")Integer id){
        return friendService.auditFail(id);
    }

}
